package com.sh.设计模式.策略模式以及优化.原始策略模式实现;

public class StrategyDemo {
    public static void main(String[] args) {
        DiscountContext context = new DiscountContext();

        context.setStrategy(new NormalUserStrategy());
        System.out.println("普通用户：" + context.getPrice(100));

        context.setStrategy(new MemberStrategy());
        System.out.println("会员用户：" + context.getPrice(100));

        context.setStrategy(new VipStrategy());
        System.out.println("VIP用户：" + context.getPrice(100));
    }
}
